#include <iostream>
#include <list>
#include <vector>
#include <string.h>
#include <string>
using std::cout;
using std::endl;
using std::vector;
using std::list;
using std::string;

template <typename T>
void display(T t){
    for(auto &con:t){
        cout << con<< " ";
    }
    cout << endl;
}

void test(){
    list<char*> list1;
    char *str1 = new char[10]();
    strcpy(str1,"hello");
    list1.push_back(str1);
    list1.push_back(str1);
    list1.push_back(str1);
    
    vector<string> vec;
    for(auto it=list1.begin();it!=list1.end();++it){
        vec.push_back(*it);
    }
    display(vec);
}

int main()
{
    

    test ();
    return 0;
}

